package gao.xaiolei.enity;

import lombok.Data;

import javax.persistence.*;
import java.time.LocalDateTime;

@Entity
@Data
@Table(name = "receiver_task_view")
public class TaskReceiverView{

    @EmbeddedId
    private TaskReceiverId id;

    // 任务名字
    @Column(name = "TASK_NAME", nullable = false)
    private String name;

    // 任务发起人
    @Column(name = "TASK_RESPONSIBLE", nullable = false)
    private String responsible;

    // 任务接受是不是组级别的,0否,1是
    @Column(name = "ISGROUP", nullable = false)
    private Integer isGroup;

    // 任务详述、备注
    @Column(name = "TASK_DESCRIPTION", columnDefinition = "text")
    private String description;

    // 是否有附件(0为无,1为有)
    @Column(name = "TASK_ATTACHMENT")
    private Integer isAttachment;

    // 任务创建日期
    @Column(name = "TASK_CREATION_DATE")
    private LocalDateTime createDate;

    // 任务类型名字
    @Column(name = "TASK_TYPE_NAME", nullable = false)
    private String typeName;

    // 任务类型编号
    @Column(name = "TASK_TYPE_NUM", nullable = false)
    private Integer typeNum;

    // 状态名字
    @Column(name = "STATUS_NAME", nullable = false)
    private String statusName;

    // 状态类型编号
    @Column(name = "STATUS_NUM", nullable = false)
    private Integer statusNum;

    // 任务优先级名字
    @Column(name = "PRIORITY_NAME", nullable = false)
    private String priorityName;

    // 任务优先级编号
    @Column(name = "PRIORITY_NUM", nullable = false)
    private String priorityNum;

    @Transient
    private Integer noReadCount;//储存未读任务数量
}
